﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace System.Xml.Linq
{
    static class nameExtentions
    {
        public static string getAttributeValue(this System.Collections.Generic.IEnumerable<System.Xml.Linq.XAttribute> attributes, string attrName)
        {
            var res = from att in attributes where att.Name == attrName select att.Value;
            return res.FirstOrDefault();
        }
    }
}
